package com.rainy.cloud.producer.service;

import com.rainy.cloud.producer.mapper.auto.UserMapper;
import com.rainy.cloud.producer.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class DemoService {

    @Autowired
    private UserMapper userMapper;

    public void addUser() {
        Date date = new Date();
        User user = new User();
        user.setUserCode("123");
        user.setUserName("aaa");
        user.setIsDel(Byte.valueOf("0"));
        user.setCreateUserCode("bbb");
        user.setCreateTime(date);
        user.setUpdateUserCode("ccc");
        user.setUpdateTime(date);
        userMapper.insert(user);
        //throw ExceptionFactory.newInstanceBizException("123");
    }

}
